<?php
namespace app\admin\model;
use think\Model;
class Payment extends Model
{
	protected $autoWriteTimestamp = true;
	public function getAmountAttr($val){
		return floatval($val);
	}
	public function getNameAttr($val,$data){
		return model('User')->value('name',['id'=>$data['uid']]);
	}
	public function getStatusDesAttr($val){
    	return $val==1?"已付":"未付";
	}
	public function getDeadlineAttr($val){
		return date("Y/m/d",$val);
	}
	public function getPayTimeAttr($val){
		return $val?date("Y/m/d",$val):"/";
	}
}